package com.healthsystem.portplay.controller;


import com.healthsystem.portplay.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * RESTf-ul Web 服务的登录控制器
 */

@RestController
public class UserNumberController {

    private final UserDao userDao;

    @Autowired
    public UserNumberController(UserDao userDao) {
        this.userDao = userDao;
    }

    // 获取用户数量的控制器方法
    @GetMapping("/countByMonth")
    public List<Map<String,Object>>GetUserCountByMonth(){
        return userDao.GetUserCountByMonth();
    }

}
